package com.itheima.mapper;


import com.itheima.pojo.Dept;
import org.apache.ibatis.annotations.*;

import javax.xml.crypto.Data;
import java.util.List;

//部门的结课 持久层,操控数据库的玩意
@Mapper   //由springboot创建该类对象并交给IOC容器管理
public interface DeptMapper {

    //@Select()  查询
    //@Update() 修改
    //@Delete()  删除
    //@Insert()  添加
    @Select("select * from dept")
    List<Dept> sb();


    @Select("select * from dept where id=#{id}")
    List<Dept> nt(Integer id);


    @Delete("delete  from dept where id=#{id} ")
    List<Dept> rb(Integer id);


    @Insert("INSERT into deptnsert  into dept( name, create_time, update_time)values (name=#{name}),(create_time=#{create_time}),(update_time=#{update_time})")
    List<Dept> bib();

    @Update("update dept set name =#{name},create_time=#{createTime},update_time=#{updateTime}")
    List<Dept> modify();
}
